use "$Data_origin/Departement.dta", clear
xtset Depnum year
gen paris=1 if Depnum==75
replace paris=0 if missing(paris)
replace paris=. if missing(Depnum)

egen day_sum=sum(nb_day), by(Depnum)
gen asin_day=asinh(day_sum)

egen partviol_sum=sum(partviol), by(Depnum)
gen asin_partviols=asinh(partviol_sum)

gen asin_pop=asinh(pop1926+1)
gen post26=1 if year>1926
replace post26=0 if missing(post26)

gen asin_perm=asinh(nb_sectperm)
save "$Data_generated/Departement.dta", replace
